<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <title><fmt:message code="workflow.th.FormPreview" /></title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="../../css/workflow/work/form.css?20200903.1">
    <link rel="stylesheet" type="text/css" href="../../css/ueditor/bootstrap.css">
    <link rel="stylesheet" href="../../lib/layui/layui/css/layui.css">
    <%--<link rel="stylesheet" href="../../lib/easyui/themes/easyui.css">--%>
    <%--<link rel="stylesheet" type="text/css" href="../lib/laydate.css"/>--%>
    <script type="text/javascript" src="/lib/jQuery-File-Upload-master/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="/js/base/base.js?20200116.1"></script>
    <script src="../../js/jquery/jquery.cookie.js"></script>

    <script src="/js/mustache.min.js"></script>
    <script src="../../lib/laydate/laydate.js"></script>
    <script src="../../lib/layer/layer.js?20201106"></script>
    <script src="/lib/ueditor/ueditor.config.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/ueditor/ueditor.all.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/ueditor/UEcontroller.js" type="text/javascript" charset="utf-8"></script>
    <script src="../../lib/jquery.form.min.js"></script>
    <%--<script src="../../lib/easyui/jquery.easyui.min.js"></script>--%>
    <script src="/js/workflow/work/calculateFormitem.js?20201016.1"></script>
    <script src="/js/workflow/work/workform.js?20191119.5"></script>
    <script type="text/javascript" src="/js/workflow/work/macroSign.js?20191115.1" ></script>
    <%--数据源js文件--%>
    <script type="text/javascript" src="/js/workflow/work/newDataControl.js" ></script>

    <!-- 金格签章 -->

    <link rel="stylesheet" href="../../lib/kinggrid/dialog/artDialog/ui-dialog.css">
    <link rel="stylesheet" href="../../lib/kinggrid/core/kinggrid.plus.css">

    <%--    <script type="text/javascript" src="../../lib/kinggrid/core/kinggrid.min.js"></script>--%>
    <%--    <script type="text/javascript" src="../../lib/kinggrid/core/kinggrid.plus.min.js"></script>--%>
    <%--    <script type="text/javascript" src="../../lib/kinggrid/dialog/artDialog/dialog.js"></script>--%>

    <!-- html签章核心JS -->
    <%--    <script type="text/javascript" src="../../lib/kinggrid/signature.min.js"></script>--%>
    <!-- PC端附加功能 -->
    <%--    <script type="text/javascript" src="../../lib/kinggrid/signature.pc.min.js"></script>--%>
    <%--<!-- 移动端端附加功能 -->--%>
    <%--<link rel="stylesheet" href="../../lib/kinggrid/core/kinggrid.plus.mobile.css">--%>
    <%--<script type="text/javascript" src="../../lib/kinggrid/signature.mobile.min.js"></script>--%>
    <!-- 手写端附加功能 -->

    <%--    <script type="text/javascript" src="../../lib/kinggrid/signature_pad.min.js"></script>--%>
    <%--    <script type="text/javascript" src="../../lib/kinggrid/jquery.timer.dev.js"></script>--%>
    <style>
        .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{
            padding: 5px;
        }
        #layui-layer100002{
            top:200px!important;
        }
        .list_table{
            border-width: medium;
            border-style: none;
            border-color: initial;
            border-collapse: collapse;
            word-wrap: break-word;
            table-layout: inherit;
        }
        .list_table .head {
            font-weight: 600;
        }
        .list_table th{
            border: #dddddd  1pt solid;
        }
        .list_table td{
            border-bottom: #7F7F7F 1pt solid;
            text-align: center;
            padding-bottom: 1px;
            padding-left: 1px;
            padding-right: 1px;
            vertical-align: middle;
            border-top: #7F7F7F 1pt solid;
            border:#dddddd  1pt solid;
            padding-top: 1px;
            padding: 0;
        }
        .imgfileBox{
            width: 72px;
            text-align: center;
            margin: 0 5px;
        }
        .imgfileBox img {
            margin: 0 10px!important;
        }
        .uploadImg {
            cursor: pointer;
            position: absolute;
            width: 72px!important;
            height: 32px;
            left: 50%;
            margin-left: -36px;
            bottom: 0px;
            font-size: 12px;
            white-space: normal;
            line-height: 16px;
        }
        .hoverbox {
            position: absolute;
            background: #fff;
            right: -45px;
            width: 60px;
            z-index: 1001;
            top: 0;
            height: auto;
            padding: 2px 0;
            margin: 2px 0 0;
            list-style: none;
            background-color: #ffffff;
            border: 1px solid #ccc;
            border: 1px solid rgba(0,0,0,0.2);
            border-right-width: 2px;
            border-bottom-width: 2px;
            -webkit-border-radius: 6px;
            -moz-border-radius: 6px;
            border-radius: 6px;
            -webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.2);
            -moz-box-shadow: 0 5px 10px rgba(0,0,0,0.2);
            box-shadow: 0 5px 10px rgba(0,0,0,0.2);
            -webkit-background-clip: padding-box;
            -moz-background-clip: padding;
            background-clip: padding-box;
            display: none;
        }
        .hoverbox li {
            font-size: 9pt;
            cursor: pointer;
            color: #333333;
            padding: 0 5px;
        }
        .plotting {
            font-weight: normal;
            line-height: 20px;
            white-space: nowrap;
            font-size: 13px;
        }
        .imgfileBox:after {
            height: 32px;
        }
        div:after, ul:after, dl:after, .clearfix:after {
            content: "";
            display: block;
            clear: both;
            height: 0;
            visibility: hidden;
        }
        .imgupload{
            width: 50px;
            height: 50px;
            display: inherit;
            margin: 0 auto;
        }
    </style>
</head>
<body>
<div>
    <div class="content">
        <div class="formDesign">

        </div>
    </div>
</div>
<div id="readcommentstpl" class="layui-fluid layui-form " style="display:none;">
    <div class="layui-row layui-rows">
        <div class="layui-col-md12">
            <fieldset class="layui-elem-field layui-field-title" style="margin: 0;">
                <legend style="display: inline-block;width: 5em;border: 0;margin-bottom: 0;"> [送]方式</legend>
            </fieldset>

            <ul class="fl clearfix" style="padding-left: 35px;box-sizing: border-box;">
                <li class="layui-badge" style="margin: 5px">请</li>
                <li class="layui-badge" style="margin: 5px">送</li>
                <li class="layui-badge" style="margin: 5px">拟请</li>
                <li class="layui-badge" style="margin: 5px">转</li>
                <li class="layui-badge" style="margin: 5px">有请</li>
                <li class="layui-badge" style="margin: 5px">请各位领导</li>

            </ul>
        </div>
    </div>
    <div class="layui-row layui-rows" style="padding-top: 22px;">
        <fieldset class="layui-elem-field layui-field-title" style="margin: 0;">
            <legend style="display: inline-block;width: 9em;border: 0;margin-bottom: 0;">请选择部门和人员</legend>
        </fieldset>

        <div class="layui-col-md12">

            <select name="" class="select1" id="select11" style="vertical-align: middle;width: 29%;    margin-left: 35px; margin-right: 10%;" num="1">
                <option value="">请选择部门</option>

            </select>
            <select name="" id="select2" style="vertical-align: middle;width: 29%;" num="2">
                <option value="">请选择人员</option>

            </select>
        </div>

    </div>
    <div class="layui-row layui-rows">
        <div class="layui-col-md12">
            <fieldset class="layui-elem-field layui-field-title" style="margin:0">
                <legend style="display: inline-block;width: 5em;border: 0;margin-bottom: 0;">处理方式</legend>
            </fieldset>

            <ul class="fl clearfix" style="padding-left: 35px;box-sizing: border-box;">
                <li class="layui-badge" style="margin: 5px">办理</li>
                <li class="layui-badge" style="margin: 5px">已阅</li>
                <li class="layui-badge" style="margin: 5px">阅示</li>
                <li class="layui-badge" style="margin: 5px">阅</li>
                <li class="layui-badge" style="margin: 5px">提出意见</li>
                <li class="layui-badge" style="margin: 5px">批示</li>
                <li class="layui-badge" style="margin: 5px">协办</li>
                <li class="layui-badge" style="margin: 5px">研酌</li>
                <li class="layui-badge" style="margin: 5px">同意</li>
                <li class="layui-badge" style="margin: 5px">不同意</li>
                <li class="layui-badge" style="margin: 5px">研阅</li>
                <li class="layui-badge" style="margin: 5px">复印</li>
            </ul>
        </div>


    </div>
    <div class="centertion" style="width:100%;margin-left: 35px;margin-top: 10px; box-sizing: border-box">
        <textarea name="" id="" cols="30" rows="5" style="width: 84%;"></textarea>
    </div>
</div>


<script>

    //    $('#cc').combotree({
    //        url: domain+'/department/getChDept?deptId=20',
    //        loadFilter: function(node){
    //            console.log(conver(node.obj))
    //            alert("33");
    //            return conver(node.obj);
    //        },
    //        onBeforeExpand:function(node,param){
    //            $(this).tree('options').url = domain+'/department/getChDept?deptId='+node.id;
    //            console.log($(this).tree('options').url )
    //           alert("33");
    //        }
    //
    //    });
    function comboTree(id,text,state,children){
        this.id = id;
        this.text = text;
        this.state = state;
        this.children = children;

    }
    function conver(data){
        var arr = [];
        data.forEach(function(v,i){
            arr.push(new comboTree(v.deptId,v.deptName,'close',[new comboTree()]));
        })
        return arr;
    }


    $(function() {
        var formid = $.getQueryString("formId");
        workForm.init({
                formhtmlurl: '../../form/formType',
                resdata: {
                    fromId: formid
                },
                flowStep: -1,//预览
                target: $('.formDesign')
            },
            function (data) {
                //控件
                //外部数据源
                outData(data);
                //内部数据源控件
                internalData(data);
                //图片控件
                $('.imgupload').load(function () {
                    if($(this).attr('width')!=50){
                        if($(this).parent().is('p')){
                            $(this).parent('p').css({
                                'border':'2px dotted #5fa5e7',
                                'margin': '0 auto',
                                'height':$(this).attr('height'),
                                'width': $(this).parents('td').width()-3,
                                'vertical-align': 'middle',
                                'display': 'table-cell'
                            })
                        }else{
                            $(this).parents('td').css({
                                'height':$(this).attr('height'),
                            })
                        }
                    }
                })
            });

        $.ajax({
            url: "../../department/getAlldept",
            type: 'get',
            data: {},
            dataType: 'json',
            success: function (obj) {
                var data = obj.obj;
                departmentData = digui(data, 0);
                var str = departmentChild(departmentData, '<option value="-1">请选择部门</option>', 0, -1);
                $('#select11').html(str);
            },
            error: function () {
            }
        });
    });




</script>
</body>
</html>
